<?php
/**
 * Created by PhpStorm.
 * User: dell
 * Date: 2018/4/30
 * Time: 16:17
 */

namespace app\common\model;
use think\Model;

class MenuContent extends Model{
    //获取主菜单下的业务
    public function getContent($id){
        $where = [
          'pid'=>$id,
          'status'=>'0'
        ];
       $res =  $this->where($where)->field('id,menuname,pid,gold,iconurl')->select();
       return $res;
    }

    //获取指定的业务信息
    public function getOneContent($id){
        $where = [
            'id'=>$id,
        ];
        $res =  $this->where($where)->field('id,menuname,pid,gold,iconurl')->find();
        return $res;
    }


}